package problem.solution.case02;

import org.springframework.aop.support.AopUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class ControllerSolution02 {

    @Resource
    ASolution02 aSolution02;

    /**
     * 解决方案2：手动从IOC容器中获取
     */
    @RequestMapping(value = "/solution02",method = RequestMethod.GET)
    public void proxyClassTest(){
        boolean aopProxy1 = AopUtils.isAopProxy(aSolution02);
        System.out.println("proxyClassTest result = " + aopProxy1);
        aSolution02.save01();
    }
}
